<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
<!--
Copyright 2008, 2009, 2010 Miguel Ángel Laguna Lobato

This file is part of Multiclinical Trial Web-PACS.

Multiclinical  Trial Web-PACS is free  software: you  can redistribute 
it and/or modify it under  the terms of the GNU General Public License 
as published by the Free  Software Foundation, either version 3 of the 
License, or (at your option) any later version.

Multiclinical  Trial Web-PACS is distributed  in the hope that it will 
be useful, but WITHOUT ANY WARRANTY; without even the implied warranty 
of  MERCHANTABILITY or  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
General Public License for more details.

You should have received a copy of the GNU General Public License
along with Multiclinical Trial Web-PACS.  If not, see 
<http://www.gnu.org/licenses/>. 
 -->

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:t="http://myfaces.apache.org/tomahawk"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:mine="http://mctwp.urjc.es/jsf" >

<ui:composition template="/jsp/include/templateProtocolable.xhtml">

<ui:define name="saveState">
	<t:saveState value="#{resultBean.results}" />
</ui:define>

<ui:define name="title">
	<h3>
		Resultados de la Tarea #{sessionInv.task.code}
	</h3>
</ui:define>

<ui:define name="tableContent">
	<mine:protoTbl
		id="resultsList"
		rows="10"
		value="#{resultBean.results}">
		
		<ui:define name="tableColumns">
		
			<mine:protoTblCol 
				id="code"
				value="#{row.code}"
				sortParser="number"
				header="#{msgs['jsf.generic.Code']}"/>
		
			<mine:protoTblDateCol 
				id="description"
				value="#{row.description}"
				sortParser="string"
				header="#{msgs['jsf.generic.Result']}"/>

			<mine:protoTblCol 
				id="dateCol"
				value="#{row.date}"
				sortParser="string"
				header="#{msgs['jsf.generic.Date']}"/>
		
			<p:column id="tblImgBotonera">
				<table class="tablaBotonera">
					<tr>
						<td class="tdBotonera">		
							<h:commandLink
								id="tblRstEdit"
								immediate="true"
								action="#{resultBean.accEditResult}">
								<h:graphicImage 
									id="tblIconRstEdit"
									value="/jsp/icons/application_form_edit.png" 
									alt="#{msgs['jsf.actions.Edit']}"
									title="#{msgs['jsf.actions.Edit']}"/>  
								<f:setPropertyActionListener 
									value="#{row}" 
									target="#{resultBean.result}" />
							</h:commandLink>
						</td>
							
						<td class="tdBotonera">	
							<h:commandLink
								id="tblRstListImages"
								immediate="true"
								action="#{viewResultImages.accListImagesOfResult}" 
								actionListener="#{resultBean.alUpdateResultSelected}">
								<h:graphicImage 
									id="tblIconRstListImages"
									value="/jsp/icons/images.png" 
									alt="#{msgs['jsf.actions.ExploreImg']}"
									title="#{msgs['jsf.actions.ExploreImg']}"/>  
							</h:commandLink>
						</td>
			
						<td class="tdBotonera">		
							<h:commandLink
								id="tblRstFileManagementCommand"
								action="#{filesAttachmentBean.accViewFiles}"
								actionListener="#{resultBean.alUpdateResultSelected}">
								<h:graphicImage 
									id="tblIconFileManagementIcon"
									value="/jsp/icons/folder_explore.png"
									alt="#{msgs['jsf.actions.FileManagement']}"
									title="#{msgs['jsf.actions.FileManagement']}"/>  
								<f:setPropertyActionListener 
									id="tblRstFileSPAL"
									value="#{row}"
									target="#{filesAttachmentBean.source}" />
							</h:commandLink>
						</td>

						<td class="tdBotoneraUltimo">		
							<h:commandLink
								id="tblRstAddImg"
								immediate="true"
								action="#{selectFolder.accSelectFolders}" 
								actionListener="#{resultBean.alUpdateResultSelected}">
								<h:graphicImage 
									id="tblIconRstAddImg"
									value="/jsp/icons/image_add.png" 
									alt="#{msgs['jsf.actions.Upload']}"
									title="#{msgs['jsf.actions.Upload']}"/>  
							</h:commandLink>
						</td>
					</tr>
				</table>
			</p:column>
		</ui:define>
	</mine:protoTbl>
</ui:define>

<ui:define name="buttonsForm">
	<h:commandButton 
		id="new" 
		styleClass="frmButton" 
		value="#{msgs['jsf.actions.Create']}" 
		action="editResult"/>
</ui:define>

</ui:composition>
</html>